package org.cyz.tools;

import javafx.stage.Screen;
import javafx.stage.Stage;
import org.cyz.tools.core.ContextManager;



public class Application extends javafx.application.Application {

    private double xOffset = 0;
    private double yOffset = 0;

    public static Stage stage;

    @Override
    public void start(final Stage primaryStage) throws Exception {

//        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
//        String script[] = ge.getAvailableFontFamilyNames();
//        for(String s:script){
//            System.out.println(s+",");
//        }
//        setUserAgentStylesheet(STYLESHEET_CASPIAN);
        //settings set org.gnome.desktop.interface scaling-factor 2
        Screen screen = Screen.getPrimary();
        double dpi = screen.getDpi();
        double scaleX = screen.getOutputScaleX();
        double scaleY = screen.getOutputScaleY();
        System.out.println("DPI: " + dpi + " - scaleX: " + scaleX + " - scaleY: " + scaleY);
        stage = ContextManager.stageFactory.createStage("Redis GUI", 900, 700, "fxml/Main.fxml");
        stage.show();
    }



}
